package com.bjtang.book.enums;

/**
 * HTTP方法枚举
 */
public enum HTTPMethod {
	GET, POST, PUT, DELETE, PATCH, TRACE, HEAD, OPTIONS;

	public static boolean isValidName(String name) {
		for (HTTPMethod httpMethod : HTTPMethod.values()) {
			if (httpMethod.name().equals(name)) {
				return true;
			}
		}
		if ("#".equals(name))
			return true;

		return false;
	}
}
